home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Franz PD / Franz PD Disk #203 (1992)(Rhein-Sieg-Soft).zip / Franz PD Disk #203 (1992)(Rhein-Sieg-Soft).adf / AK_gen0-Library / Programmers / StubsSource.LHA / AK_GEN0.h next >
C/C++ Source or Header  |  2005-06-29  |  8KB  |  189 lines

  1. /* ************************************************************************ */
  2. /* AK_GEN0_H V35.105                                                        */
  3. /* ************************************************************************ */
  4. /* (c) 1989-92 by Andreas Ralph Kleinert. All rights reserved.              */
  5. /* COMMERCIAL USE IS NOT ALLOWED WITHOUT SPECIAL PERMISSION BY THE AUTHOR ! */
  6. /* ************************************************************************ */
  7. /* Version          : V35.105                                               */
  8. /* Last updated     : 28.06.1992                                            */
  9. /* Compiler         : SAS/C V5.10a/b                                        */
  10. /* Compiler-Options : (MakeFile)                                            */
  11. /* ************************************************************************ */
  12. /* Address          : Andreas Ralph Kleinert                                */
  13. /*                    Grube Hohe Grethe 23                                  */
  14. /*                    W-5900 Siegen 1                                       */
  15. /*                    Germany                                               */
  16. /* ************************************************************************ */
  17.  
  18. #ifndef AK_GEN0_H
  19. #define AK_GEN0_H
  20.  
  21. #define AK_GEN0_VERSION (35)
  22. #define AK_GEN0_REVISION (105)
  23.  
  24. #include <intuition/intuitionbase.h>
  25. #include <exec/memory.h>
  26. #include <graphics/gfxbase.h>
  27. #include <stdio.h>
  28. #include <libraries/dos.h>
  29.  
  30. /* Defines */
  31.  
  32. #define N (NULL)
  33. #define FIRST_SCREEN   ( (struct Screen *) IntuitionBase->FirstScreen )
  34. #define CURRENT_WINDOW ( (struct Window *) IntuitionBase->ActiveWindow )
  35. #define CURRENT_SCREEN ( (struct Screen *) IntuitionBase->ActiveScreen )
  36. #define CURRENT_MOUSEX ( CURRENT_WINDOW->MouseX )
  37. #define CURRENT_MOUSEY ( CURRENT_WINDOW->MouseY )
  38. #define NEWWINDOW (sizeof(struct NewWindow))
  39. #define WINDOW (sizeof(struct Window))
  40. #define BORDER (sizeof(struct Border))
  41. #define MENU (sizeof(struct Menu))
  42. #define GADGET (sizeof(struct Gadget))
  43. #define ITEXT (sizeof(struct IntuiText))
  44. #define ITEM (sizeof(struct MenuItem))
  45. #define SUBITEM ITEM
  46. #define STRINGINFO (sizeof(struct StringInfo))
  47. #define REQUESTER (sizeof(struct Requester))
  48. #define PROPINFO (sizeof(struct PropInfo))
  49. #define ALERT (sizeof(struct AlertData))
  50. #define NEWSCREEN (sizeof(struct NewScreen))
  51.  
  52. /* Constants */
  53.  
  54. #define AK_FILEREQ_STRING_LEN (256) /* this will not change and can be used */
  55.                                     /* as a parameter to "FreeMem()"        */
  56.  
  57. /* Defines for "direntry[]" of AK_ReadDir() */
  58.  
  59. #define AKF_IS_FILE (FALSE) /* compatibility  */
  60. #define AKF_IS_DIR  (TRUE)  /* compatibility  */
  61. #define AKF_IS_VOL  (1<<2)  /* NEW in V35.99, only FileRequester PRIVATE */
  62.  
  63. /* Official defines sine V35.102 :
  64.  
  65.    These defines had changed since V35.98, but they were no longer compatible.
  66.    This bug is now fixed, but also for compatibility, entries in "direntry[]"
  67.    are limited to the values TRUE or FALSE, which means "Dir" or "Not Dir"
  68.    (== "File").
  69.    The use of the new define "AKF_IS_VOL" is only thought for PRIVATE use
  70.    with the FileRequester's "Assigns"-Gadget.
  71.    Do not use it.
  72. */   
  73.  
  74.  
  75. /* Library-Bases (to be declared as externals) */
  76.  
  77. #ifndef AKG_NOBASES
  78.  
  79. struct IntuitionBase *IntuitionBase = N;
  80. struct GfxBase       *GfxBase       = N;
  81. struct AKBase        *AKBase        = N;
  82. struct LayersBase    *LayersBase    = N;
  83.  
  84. #endif AKG_NOBASES
  85.  
  86. /* MACROs */
  87.  
  88. #define SET_MAX (WindowLimits(CURRENT_WINDOW, 0, 0, 640, 256))
  89.  
  90.  /* SET_MAX is only included for compatibility.
  91.     Use SIZE_PAL/SIZE_NTSC instead.
  92.  */
  93.  
  94. #define SIZE_PAL(window)  (WindowLimits(window, 0, 0, 640, 256))
  95. #define SIZE_NTSC(window) (WindowLimits(window, 0, 0, 640, 200))
  96.  
  97. #define MEN MENUNUM(im->Code)     /* better use xMEN,xITN,xSTN */
  98. #define ITN ITEMNUM(im->Code)
  99. #define STN SUBNUM(im->Code)
  100.  
  101. #define MEN_2 MENUNUM(im_2->Code) /* better use xMEN,xITN,xSTN */
  102. #define ITN_2 ITEMNUM(im_2->Code)
  103. #define STN_2 SUBNUM(im_2->Code)
  104.  
  105. #define xMEN(x) MENUNUM(x->Code)  /* use this, when possible */
  106. #define xITN(x) ITEMNUM(x->Code)  /* or use the originals    */
  107. #define xSTN(x) SUBNUM(x->Code)
  108.  
  109. /* Standard-Values */
  110.  
  111.  /* If you want to use the above Macros, you have to use the following */
  112.  /* variables :                                                        */
  113.  
  114. #ifndef AKG_NOVARS
  115.  
  116. struct IntuiMessage *im             = N; /* First Window  */
  117. struct Window       *w              = N;
  118.  
  119. struct IntuiMessage *im_2           = N; /* Second Window */
  120. struct Window       *w_2            = N;
  121.  
  122. #endif AKG_NOVARS
  123.  
  124. /* Declarations */
  125.  
  126. extern struct Screen * __saveds AK_Screen(long l, long t, long w, long h, long d,
  127.                                   long dp, long bp, long vm, long ty,
  128.                                   struct TextAttr *f, char *title, 
  129.                                   struct BitMap *cbm);
  130.  
  131. extern struct Window * __saveds AK_Window(long l, long t, long w, long h, long d,
  132.                                   long b, long idcmp, long flags,
  133.                                   struct Gadget *fg, struct Image *cm,
  134.                                   char *title, struct Screen *screen,
  135.                                   struct BitMap *bm, long minw, long minh,
  136.                                   long maxw, long maxh, long type);
  137.  
  138. extern struct Menu * __saveds AK_Menu(struct Menu *next, long l, long w, long flags,
  139.                               char *name, struct MenuItem *item);
  140.  
  141. extern struct MenuItem * __saveds AK_MenuItem(struct MenuItem *next, long t, long w,
  142.                                       long flags, long me, APTR itfi, 
  143.                                       APTR sefi, long scut,
  144.                                       struct MenuItem * subi);
  145.  
  146. extern struct MenuItem * __saveds AK_SubItem(struct MenuItem *next, long l, long t,
  147.                                      long w, long flags, long me, APTR itfi,
  148.                                      APTR sefi, long scut,
  149.                                      struct MenuItem *subi);
  150.  
  151. extern struct Gadget * __saveds AK_Gadget(struct Gadget *next, long l, long t, long w,
  152.                                   long h, long flags, long act, long type,
  153.                                   APTR gadr, APTR selr, struct IntuiText *text,
  154.                                   APTR sp, long id);
  155.  
  156. extern struct StringInfo * __saveds AK_StringInfo(long groesse, long maximum, 
  157.                                           struct KeyMap *km);
  158.  
  159. extern struct Border * __saveds AK_Border(long l, long t, long f, long b, long d,
  160.                                    long c, SHORT *xy, struct Border *next);
  161.  
  162. extern struct IntuiText * __saveds AK_IText(long f, long b, long d, long l, long t,
  163.                                      struct TextAttr *font, char *text,
  164.                                      struct IntuiText *next);
  165.  
  166. extern void   __saveds AK_GfxPrint(struct Window *w, char *text, long x, long y);
  167.  
  168. extern void   __saveds AK_IntuiPrint(struct Window *w, char *text, long x, long y);
  169.  
  170. extern void   __saveds AK_RefreshDisp(struct Screen *sc, struct Window *w);
  171.  
  172. extern long   __saveds AK_AutoRequester(struct Window *w, char *obertext, char *jatext,
  173.                               char *neintext);
  174.  
  175. extern long   __saveds AK_Alert(char *text, long height);
  176.  
  177. extern char * __saveds AK_FileRequest(long xpos, long ypos, struct Screen *fscreen,
  178.                                       struct Window *fwindow, long ftype);
  179.  
  180. extern long   __saveds AK_ReadDir(char *pathname, char **direntry, long *dirtype);
  181.  
  182. extern void   __saveds AK_WaitKey(long rawcode);
  183.  
  184. extern void   __saveds AK_WaitLeft(void);
  185.  
  186. extern long   __saveds AK_GetNum(long min, long max);
  187.  
  188. #endif AK_GEN0_H
  189.